The present invention concerns a method and device for modifying the geometric orientation of a digital image.
It concerns more particularly the geometric transformation of an image in an image acquisition apparatus, such as a digital photographic apparatus or a digital camera, which can take images in different orientations, and then store them in a compressed data file before they are displayed.
In this type of apparatus, photographs or images can be taken in several different orientations, according to the position of the appliance with respect to the object to the photographed.
There are generally distinguished at least one so-called xe2x80x9clandscapexe2x80x9d orientation, in which the apparatus is placed horizontally, and a so-called xe2x80x9cportraitxe2x80x9d orientation, in which the apparatus is placed vertically.
Generally, the images thus taken in different orientations are stored in a compressed file in a single orientation, then subsequently displayed on a screen, integrated or not into the apparatus. It is then necessary to modify the orientation of the display screen according to the orientation of the images, notably by rotating the apparatus or display screen through 90 degrees.
The document U.S. Pat. No. 5,900,909 describes a digital photographic apparatus which makes it possible to improve the convenience of display of the images taken in different orientations.
For this purpose, it describes an apparatus equipped with an automatic detector for the orientation of the apparatus when the photograph is taken. According to this orientation detection, a rotation of the image is effected in the apparatus, before storing this digital image in a memory of the apparatus and displaying it.
Each image can thus be stored in the apparatus in an orientation allowing convenient display of the image.
In this document, the image is acquired by a CCD (Charge Coupled Device) sensor, and then read by an analogue to digital converter. When the orientation of the image is to be modified, the direction of reading the rows and columns of the signal output from the CCD sensor is modified according to the desired orientation and the value of the width and height of the image are modified, that is to say, as a general rule, reversed.
The present invention proposes a method and device for modifying the geometric orientation of a digital image which effects a rapid modification of the orientation in space of a digital image which is to be coded in a compressed file.
To this end, the present invention relates to a method of modifying the geometric orientation of a digital image in an image acquisition apparatus adapted to acquire an image in one amongst several different orientations and to store said image in the form of a compressed file.
In accordance with the invention, this method comprises the following steps:
acquiring an image in a chosen orientation;
identifying said chosen orientation;
converting said image into a digital image;
spectral transformation of said digital image;
determining a geometric transformation to be applied to said image acquired as a function of the chosen orientation;
applying the geometric transformation determined to symbols associated with spectral coefficients issuing from said spectral transformation;
recording in the compressed file two indicators representing a normal or reversed order of the symbols respectively in two directions of the digital image; and
coding the digital image in said compressed file.
Thus it is particularly advantageous to effect the manipulation and geometric transformation of the digital image in the compressed field on the image, on symbols representing coefficients issuing from a spectral transformation of an image, in order to reduce the calculations and complexity of this operation and to be more efficient in terms of memory consumption.
This geometric transformation of an image can thus be effected at the time of the conventional coding of the image in a compressed data file, after spectral transformation of the digital image, by virtue of the identification of the orientation of the image at the time of acquisition thereof.
The recording of two indicators in the compressed file makes it possible, when the image is decoded, notably for display, to take account of the modification of the order of the spectral coefficients in order to apply a reverse spectral transformation to the digital signal.
Such indicators can for example be updated by alternation of the values 0 and 1 representing respectively a normal or reversed order of the symbols, for each direction of the digital image.
According to a preferred characteristic of the invention, this method of modifying the geometric orientation includes a step of quantizing the spectral coefficients before the step of applying the geometric transformation, said symbols being quantization symbols.
This quantization step is normally used at the time of coding a digital image with loss.
According to another preferred characteristic of the invention, the spectral transformation is a multiresolution spectral decomposition, such as a wavelet spectral decomposition.
In this way a division of the image into frequency signal sub-bands is obtained, which makes it possible to apply a geometric transformation to data areas of smaller sizes than that of the original image.
This characteristic also makes it possible to obtain a saving in time during the geometric transformation of the digital image.
According to one advantageous characteristic of the invention, the step of identifying the chosen orientation is implemented by an automatic orientation detector incorporated in said image acquisition apparatus.
This automatic detection can thus be effected by detecting the position of the apparatus when the image is acquired.
Alternatively, the step of identifying the chosen orientation is implemented by a manual orientation selector incorporated in said image acquisition apparatus.
This selector enables a user to define the position of the apparatus before a photograph is taken.
In both cases, whether the image orientation is identified by an automatic detector incorporated in the apparatus or by a manual selector, this identification makes it possible to indicate, before coding of the image, the orientation of the latter in order to effect, if necessary, a geometric transformation thereof before storing in a compressed data file.
In practice, the image acquisition orientation is chosen from amongst a rotation through 90 degrees, a rotation through 180 degrees or a rotation through 270 degrees.
A photographic apparatus can thus be pivoted in space from its normal position of use without any inconvenience in the taking of the images, which will automatically be stored in the apparatus in a convenient display position.
In a practical implementation of the invention, when the spectral transformation is a multiresolution spectral decomposition, such as a wavelet spectral decomposition, the method of modifying the geometric orientation also comprises a step of transposition of a frequency sub-band having coefficients of low frequency in a first direction of the digital image and of high frequency in a second direction of a digital image with a sub-band with a frequency of the same resolution level in the spectral decomposition, having coefficients of high frequency in said first direction and of low frequency in said second direction when the geometric transformation comprises a rotation through 90 degrees or 270 degrees.
This transposition makes it possible to take into account the changes in direction of the symbols during rotation of an image through 90 or 270 degrees, for example, for a correct application of the digital signal decoding method.
According to another practical characteristic of the invention, the method of modifying the geometric orientation also comprises a step of transposing the values of the height and width of the image when the geometric transformation applied comprises a rotation through 90 degrees or 270 degrees.
Correlatively, the present invention also concerns a device for modifying the geometric orientation of a digital image incorporated in an image acquisition apparatus adapted to acquire an image in accordance with one amongst several different orientations and to store said image in the form of a compressed file, having:
means of acquiring an image in a chosen orientation;
means of identifying said chosen orientation;
means of converting said image into a digital image;
means of spectral transformation of said digital image;
means of determining a geometric transformation to be applied to said image acquired as a function of the chosen orientation;
means of applying the geometric transformation determined to symbols associated with spectral coefficients issuing from said spectral transformation;
means of recording in the compressed file two indicators representing a normal or reversed order of the symbols respectively in two directions of the digital image; and
means of coding the digital image in said compressed file.
This geometric orientation modification device has characteristics and advantages similar to those described previously for the geometric orientation modification method according to the invention.
The present invention also concerns an image processing method, comprising the steps of;
generating image data representing an image;
wavelet-transforming the image data;
quantizing the transformed data; and
entropically encoding the quantized data, characterized in that said method further comprising the steps of:
identifying a correct orientation of the image represented by the image data, and
applying a geometric transformation to the transformed data in accordance with the result of the identification.
Thank to this method, the geometric transformation can be performed directly to the transformed data, after identifying the correct orientation of the image.
According to a preferred characteristic of the invention, image data are transformed into sub-bands corresponding to each of a plurality of resolution levels in said wavelet-transforming.
Then, the geometric transformation is performed to the signal sub-bands obtained by a wavelet spectral decomposition.
In practice, the result of the identification is classified in four kinds of cases, that is landscape, inverse landscape, portrait and inverse portrait orientations.
According to a preferred characteristic of the invention, the image processing method comprises a step of storing the information showing the result of the identification and the encoded data.
The present invention also concerns an image acquisition apparatus, a digital photographic apparatus and a digital camera adapted to function in a still image mode having a geometric orientation modification device according to the invention.
It also relates to a storage means or information medium, which can be read by a computer or a microprocessor, incorporated or not into the latter, possibly removable, comprising portions of software codes or program instructions to implement the steps of the geometric orientation modification method or of the image processing method according to the invention, when said storage means or information medium is used by the microprocessor or a computer.
Finally, the present invention also concerns a computer program product, loadable into a processing apparatus, and comprising software code portions adapted to implement the geometric orientation modification method or the image processing method according to the invention.
The advantages of the image acquisition apparatus, the digital photographic apparatus, the digital camera, the storage or information medium means and the computer program product are similar to those of the method which they implement.
Other particularities and advantages of the invention will also emerge from the following description of a preferred embodiment of the invention.
In the accompanying drawings, given by way of non-limitative examples: